package icu.xuyijie.springbootlearning1.chapter4.async;

/**
 * @author 徐一杰
 * @date 2025/03/06 13:40
 * @description
 */
public class MultiProcessTest {
    public static void main(String[] args) {
        // 开启一个新线程、异步
        new Thread(() -> {
            try {
                Thread.sleep(1000);
                System.out.println(Thread.currentThread().getName()+ "子线程执行结束");
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }).start();

        System.out.println("主线程执行完毕");
    }
}
